# Math Constants

M_E = 2.71828182845904523536028747135  # e
M_LOG2E = 1.44269504088896340735992468100  # log_2  e
M_LOG10E = 0.43429448190325182765112891892  # log_10  e
M_SQRT2 = 1.41421356237309504880168872421  # sqrt 2
M_SQRT1_2 = 0.70710678118654752440084436210  # sqrt 1/2
M_SQRT3 = 1.73205080756887729352744634151  # sqrt 3
M_PI = 3.14159265358979323846264338328  # pi
M_PI_2 = 1.57079632679489661923132169164  # pi/2
M_PI_4 = 0.78539816339744830966156608458  # pi/4
M_SQRT_PI = 1.77245385090551602729816748334  # sqrt pi
M_2_SQRT_PI = 1.12837916709551257389615890312  # 2/sqrt pi
M_1_PI = 0.31830988618379067153776752675  # 1/pi
M_2_PI = 0.63661977236758134307553505349  # 2/pi
M_LN10 = 2.30258509299404568401799145468  # ln 10
M_LN2 = 0.69314718055994530941723212146  # ln 2
M_LN_PI = 1.14472988584940017414342735135  # ln pi
M_EULER = 0.57721566490153286060651209008  # Euler constant

LIGHT_SPEED_MS = 2.99792458e8  # 光速 m/s
PLANK_CONSTANT = 6.62607553e-34  # 普朗克常数 J*s
ELECTRON_VOLT = 1.60217733e-19  # 电子伏特 eV
BOLTZMANN_CONSTANT = 1.3806513e-23  # 玻尔兹曼常数 J/k

# reference for bandwidth conversion when 0.1 nm ~ 12.5 GHz
REFERENCE_WAVE_LENGTH = 1.54865737463133e-6

# LOG limits

MIN_DBM = -100

# Constants from SGL - MKS

CONST_SPEED_OF_LIGHT = 2.99792458e8  # m / s
CONST_GRAVITATIONAL_CONSTANT = 6.67259e-11  # m^3 / kg s^2
CONST_PLANCKS_CONSTANT_H = 6.6260755e-34  # kg m^2 / s
CONST_PLANCKS_CONSTANT_HBAR = 1.05457266913e-34  # kg m^2 / s
CONST_VACUUM_PERMEABILITY = 1.25663706144e-6  # kg m / A^2 s^2
CONST_ASTRONOMICAL_UNIT = 1.495979e11  # m
CONST_LIGHT_YEAR = 9.46053620707e15  # m
CONST_PARSEC = 3.08567818589e16  # m
CONST_GRAV_ACCEL = 9.80665e0  # m / s^2
CONST_ELECTRON_VOLT = 1.60217733e-19  # kg m^2 / s^2
CONST_MASS_ELECTRON = 9.10938961969e-31  # kg
CONST_MASS_MUON = 1.88353269879e-28  # kg
CONST_MASS_PROTON = 1.67262307095e-27  # kg
CONST_MASS_NEUTRON = 1.67492862142e-27  # kg
CONST_RYDBERG = 2.17987412173e-18  # kg m^2 / s^2
CONST_BOLTZMANN = 1.3806513e-23  # kg m^2 / K s^2
CONST_BOHR_MAGNETON = 9.27401542715e-24  # A m^2
CONST_NUCLEAR_MAGNETON = 5.05078658357e-27  # A m^2
CONST_ELECTRON_MAGNETIC_MOMENT = 9.28477005945e-24  # A m^2
CONST_PROTON_MAGNETIC_MOMENT = 1.41060761072e-26  # A m^2
CONST_MOLAR_GAS = 8.31447086363e0  # kg m^2 / K mol s^2
CONST_STANDARD_GAS_VOLUME = 2.2413992e-2  # m^3 / mol
CONST_MINUTE = 6e1  # s
CONST_HOUR = 3.6e3  # s
CONST_DAY = 8.64e4  # s
CONST_WEEK = 6.048e5  # s
CONST_INCH = 2.54e-2  # m
CONST_FOOT = 3.048e-1  # m
CONST_YARD = 9.144e-1  # m
CONST_MILE = 1.609344e3  # m
CONST_NAUTICAL_MILE = 1.852e3  # m
CONST_FATHOM = 1.8288e0  # m
CONST_MIL = 2.54e-5  # m
CONST_POINT = 3.52777777778e-4  # m
CONST_TEXPOINT = 3.51459803515e-4  # m
CONST_MICRON = 1e-6  # m
CONST_ANGSTROM = 1e-10  # m
CONST_HECTARE = 1e4  # m^2
CONST_ACRE = 4.04685642241e3  # m^2
CONST_BARN = 1e-28  # m^2
CONST_LITER = 1e-3  # m^3
CONST_US_GALLON = 3.78541178402e-3  # m^3
CONST_QUART = 9.46352946004e-4  # m^3
CONST_PINT = 4.73176473002e-4  # m^3
CONST_CUP = 2.36588236501e-4  # m^3
CONST_FLUID_OUNCE = 2.95735295626e-5  # m^3
CONST_TABLESPOON = 1.47867647813e-5  # m^3
CONST_TEASPOON = 4.92892159375e-6  # m^3
CONST_CANADIAN_GALLON = 4.54609e-3  # m^3
CONST_UK_GALLON = 4.546092e-3  # m^3
CONST_MILES_PER_HOUR = 4.4704e-1  # m / s
CONST_KILOMETERS_PER_HOUR = 2.77777777778e-1  # m / s
CONST_KNOT = 5.14444444444e-1  # m / s
CONST_POUND_MASS = 4.5359237e-1  # kg
CONST_OUNCE_MASS = 2.8349523125e-2  # kg
CONST_TON = 9.0718474e2  # kg
CONST_METRIC_TON = 1e3  # kg
CONST_UK_TON = 1.0160469088e3  # kg
CONST_TROY_OUNCE = 3.1103475e-2  # kg
CONST_CARAT = 2e-4  # kg
CONST_UNIFIED_ATOMIC_MASS = 1.6605402e-27  # kg
CONST_GRAM_FORCE = 9.80665e-3  # kg m / s^2
CONST_POUND_FORCE = 4.44822161526e0  # kg m / s^2
CONST_KILOPOUND_FORCE = 4.44822161526e3  # kg m / s^2
CONST_POUNDAL = 1.38255e-1  # kg m / s^2
CONST_CALORIE = 4.1868e0  # kg m^2 / s^2
CONST_BTU = 1.05505585262e3  # kg m^2 / s^2
CONST_THERM = 1.05506e8  # kg m^2 / s^2
CONST_HORSEPOWER = 7.457e2  # kg m^2 / s^3
CONST_BAR = 1e5  # kg / m s^2
CONST_STD_ATMOSPHERE = 1.01325e5  # kg / m s^2
CONST_TORR = 1.33322368421e2  # kg / m s^2
CONST_METER_OF_MERCURY = 1.33322368421e5  # kg / m s^2
CONST_INCH_OF_MERCURY = 3.38638815789e3  # kg / m s^2
CONST_INCH_OF_WATER = 2.4884e2  # kg / m s^2
CONST_PSI = 6.89475729317e3  # kg / m s^2
CONST_POISE = 1e-1  # kg m^-1 s^-1
CONST_STOKES = 1e-4  # m^2 / s
CONST_FARADAY = 9.6485308989e4  # A s / mol
CONST_ELECTRON_CHARGE = 1.60217733e-19  # A s
CONST_GAUSS = 1e-4  # kg / A s^2
CONST_STILB = 1e4  # cd / m^2
CONST_LUMEN = 1e0  # cd sr
CONST_LUX = 1e0  # cd sr / m^2
CONST_PHOT = 1e4  # cd sr / m^2
CONST_FOOTCANDLE = 1.076e1  # cd sr / m^2
CONST_LAMBERT = 1e4  # cd sr / m^2
CONST_FOOTLAMBERT = 1.07639104e1  # cd sr / m^2
CONST_CURIE = 3.7e10  # 1 / s
CONST_ROENTGEN = 2.58e-4  # A s / kg
CONST_RAD = 1e-2  # m^2 / s^2
CONST_SOLAR_MASS = 1.98892e30  # kg
CONST_BOHR_RADIUS = 5.291772083e-11  # m
CONST_VACUUM_PERMITTIVITY = 8.854187817e-12  # A^2 s^4 / kg m^3
CONST_NUM_FINE_STRUCTURE = 7.29735307964e-3  # 1
CONST_NUM_AVOGADRO = 6.0221367e23  # 1 / mol
